#include <iostream>
#include <vector>
#include <algorithm>

using std::vector;
using std::cin;
using std::cout;

int FindMax(vector<int> &v, int n) {
	int max_coor = 0;
	for (int i = 0; i < n; i++) {
		if (v[i] > v[max_coor]) {
			max_coor = i;
		}
	}
	return max_coor;
}

int main() {
	int n;
	cin >> n;
	if (n == 0) {
		return 0;
	}
	vector<int> v(n);
	for (int i = 0; i < n; i++) {
		cin >> v[i];
	}
	for (int i = 0; i < n; i++) {
		int max_coor = FindMax(v, n-i);
		std::swap(v[n-1-i], v[max_coor]);
	}
	for (int i = 0; i < n; i++) {
		cout << v[i] << ' ';
	}
	return 0;
}